/**
 * created by 小卷毛, 2020/9/13
 * Copyright (c) 2020, 416143467@qq.com All Rights Reserved.
 * #                   *********                            #
 * #                  ************                          #
 * #                  *************                         #
 * #                 **  ***********                        #
 * #                ***  ****** *****                       #
 * #                *** *******   ****                      #
 * #               ***  ********** ****                     #
 * #              ****  *********** ****                    #
 * #            *****   ***********  *****                  #
 * #           ******   *** ********   *****                #
 * #           *****   ***   ********   ******              #
 * #          ******   ***  ***********   ******            #
 * #         ******   **** **************  ******           #
 * #        *******  ********************* *******          #
 * #        *******  ******************************         #
 * #       *******  ****** ***************** *******        #
 * #       *******  ****** ****** *********   ******        #
 * #       *******    **  ******   ******     ******        #
 * #       *******        ******    *****     *****         #
 * #        ******        *****     *****     ****          #
 * #         *****        ****      *****     ***           #
 * #          *****       ***        ***      *             #
 * #            **       ****        ****                   #
 */
package com.sgcc.pda.lib_tools_database.bean.ticket;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.ToMany;
import org.greenrobot.greendao.annotation.Unique;
import org.greenrobot.greendao.annotation.Generated;

import java.util.List;

import org.greenrobot.greendao.DaoException;

import com.sgcc.pda.lib_tools_database.gen.DaoSession;
import com.sgcc.pda.lib_tools_database.gen.LocalImageDao;
import com.sgcc.pda.lib_tools_database.gen.TicketPermitDao;

/**
 * 描 述：离线工作票许可、终结表
 * 作 者：小卷毛  2020-09-13 14:41
 * 修改描述：
 * 修 改 人：
 * 修改版本：
 */
@Entity
public class TicketPermit {

    @Id
    @Unique
    private String RECORD_ID; //工作票ID
    private String WT_RECORD_WAY; //供电方许可方式
    private String WT_PERMIT_PER_NAME; //供电方许可人名称
    private String WT_RECORD_DATE; //许可时间
    private String WT_ALLOW_TIME; //许可开工时间
    private String WT_ALLOW_WAY; //客户方许可方式
    private String WT_CUSTOMER_NAME; //客户方许可人名称
    private String WT_SAFE_MEASURE_ADD; //补充安全措施
    private String WT_FILD_PATHS; //附件ID（终结时使用）
    private String WT_IS_PERMIT; //许可信息是否提交
    private String WT_MODE; //数据模式（1许可 2终结）

    private String WT_END_REMARK; //终结备注
    private String faciDataList; //终结设备

    @ToMany(referencedJoinProperty = "parentId")
    private List<LocalImage> signDataList;
    /**
     * Used to resolve relations
     */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;
    /**
     * Used for active entity operations.
     */
    @Generated(hash = 1160199864)
    private transient TicketPermitDao myDao;

    @Generated(hash = 1463452430)
    public TicketPermit(String RECORD_ID, String WT_RECORD_WAY,
                        String WT_PERMIT_PER_NAME, String WT_RECORD_DATE, String WT_ALLOW_TIME,
                        String WT_ALLOW_WAY, String WT_CUSTOMER_NAME,
                        String WT_SAFE_MEASURE_ADD, String WT_FILD_PATHS, String WT_IS_PERMIT,
                        String WT_MODE, String WT_END_REMARK, String faciDataList) {
        this.RECORD_ID = RECORD_ID;
        this.WT_RECORD_WAY = WT_RECORD_WAY;
        this.WT_PERMIT_PER_NAME = WT_PERMIT_PER_NAME;
        this.WT_RECORD_DATE = WT_RECORD_DATE;
        this.WT_ALLOW_TIME = WT_ALLOW_TIME;
        this.WT_ALLOW_WAY = WT_ALLOW_WAY;
        this.WT_CUSTOMER_NAME = WT_CUSTOMER_NAME;
        this.WT_SAFE_MEASURE_ADD = WT_SAFE_MEASURE_ADD;
        this.WT_FILD_PATHS = WT_FILD_PATHS;
        this.WT_IS_PERMIT = WT_IS_PERMIT;
        this.WT_MODE = WT_MODE;
        this.WT_END_REMARK = WT_END_REMARK;
        this.faciDataList = faciDataList;
    }

    @Generated(hash = 166164778)
    public TicketPermit() {
    }

    public String getRECORD_ID() {
        return this.RECORD_ID;
    }

    public void setRECORD_ID(String RECORD_ID) {
        this.RECORD_ID = RECORD_ID;
    }

    public String getWT_RECORD_WAY() {
        return this.WT_RECORD_WAY;
    }

    public void setWT_RECORD_WAY(String WT_RECORD_WAY) {
        this.WT_RECORD_WAY = WT_RECORD_WAY;
    }

    public String getWT_PERMIT_PER_NAME() {
        return this.WT_PERMIT_PER_NAME;
    }

    public void setWT_PERMIT_PER_NAME(String WT_PERMIT_PER_NAME) {
        this.WT_PERMIT_PER_NAME = WT_PERMIT_PER_NAME;
    }

    public String getWT_RECORD_DATE() {
        return this.WT_RECORD_DATE;
    }

    public void setWT_RECORD_DATE(String WT_RECORD_DATE) {
        this.WT_RECORD_DATE = WT_RECORD_DATE;
    }

    public String getWT_ALLOW_TIME() {
        return this.WT_ALLOW_TIME;
    }

    public void setWT_ALLOW_TIME(String WT_ALLOW_TIME) {
        this.WT_ALLOW_TIME = WT_ALLOW_TIME;
    }

    public String getWT_ALLOW_WAY() {
        return this.WT_ALLOW_WAY;
    }

    public void setWT_ALLOW_WAY(String WT_ALLOW_WAY) {
        this.WT_ALLOW_WAY = WT_ALLOW_WAY;
    }

    public String getWT_CUSTOMER_NAME() {
        return this.WT_CUSTOMER_NAME;
    }

    public void setWT_CUSTOMER_NAME(String WT_CUSTOMER_NAME) {
        this.WT_CUSTOMER_NAME = WT_CUSTOMER_NAME;
    }

    public String getWT_SAFE_MEASURE_ADD() {
        return this.WT_SAFE_MEASURE_ADD;
    }

    public void setWT_SAFE_MEASURE_ADD(String WT_SAFE_MEASURE_ADD) {
        this.WT_SAFE_MEASURE_ADD = WT_SAFE_MEASURE_ADD;
    }

    public String getWT_FILD_PATHS() {
        return this.WT_FILD_PATHS;
    }

    public void setWT_FILD_PATHS(String WT_FILD_PATHS) {
        this.WT_FILD_PATHS = WT_FILD_PATHS;
    }

    public String getWT_IS_PERMIT() {
        return this.WT_IS_PERMIT;
    }

    public void setWT_IS_PERMIT(String WT_IS_PERMIT) {
        this.WT_IS_PERMIT = WT_IS_PERMIT;
    }

    public String getWT_MODE() {
        return this.WT_MODE;
    }

    public void setWT_MODE(String WT_MODE) {
        this.WT_MODE = WT_MODE;
    }

    public String getWT_END_REMARK() {
        return this.WT_END_REMARK;
    }

    public void setWT_END_REMARK(String WT_END_REMARK) {
        this.WT_END_REMARK = WT_END_REMARK;
    }

    public String getFaciDataList() {
        return this.faciDataList;
    }

    public void setFaciDataList(String faciDataList) {
        this.faciDataList = faciDataList;
    }

    public void setSignDataList(List<LocalImage> signDataList) {
        this.signDataList = signDataList;
    }

    /**
     * To-many relationship, resolved on first access (and after reset).
     * Changes to to-many relations are not persisted, make changes to the target entity.
     */
    @Generated(hash = 855799240)
    public List<LocalImage> getSignDataList() {
        if (signDataList == null) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            LocalImageDao targetDao = daoSession.getLocalImageDao();
            List<LocalImage> signDataListNew = targetDao
                    ._queryTicketPermit_SignDataList(RECORD_ID);
            synchronized (this) {
                if (signDataList == null) {
                    signDataList = signDataListNew;
                }
            }
        }
        return signDataList;
    }

    /**
     * Resets a to-many relationship, making the next get call to query for a fresh result.
     */
    @Generated(hash = 363372117)
    public synchronized void resetSignDataList() {
        signDataList = null;
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }

    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }

    /**
     * called by internal mechanisms, do not call yourself.
     */
    @Generated(hash = 1100802485)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getTicketPermitDao() : null;
    }

}
